package com.uduemc.biso.core.common.feign;

import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

import com.uduemc.biso.core.common.dto.CBMastermanageAppend;
import com.uduemc.biso.core.common.feign.fallback.CMasterUserFeignFallback;
import com.uduemc.biso.core.utils.RestResult;

@FeignClient(value = "BISO-BASIC-SERVICE", fallback = CMasterUserFeignFallback.class)
@RequestMapping(value = "/common/master-user")
public interface CMasterUserFeign {

	/**
	 * 添加用户操作
	 * 
	 * @return
	 */
	@PostMapping("/user-append")
	public RestResult userAppend(@RequestBody CBMastermanageAppend cBMastermanageAppend);

	/**
	 * 通过参数过滤获取对应的列表数据
	 * 
	 * @param username
	 * @param numberKey
	 * @param status
	 * @param loginNode
	 * @param pageNumber
	 * @param pageSize
	 * @param orderByString
	 * @return
	 */
	@PostMapping("/user-infos")
	public RestResult userInfo(@RequestParam(value = "username", defaultValue = "") String username,
			@RequestParam(value = "numberKey", defaultValue = "") String numberKey,
			@RequestParam(value = "status", defaultValue = "-1") short status,
			@RequestParam(value = "loginNode", defaultValue = "-1") short loginNode,
			@RequestParam(value = "pageNumber", defaultValue = "1") int pageNumber,
			@RequestParam(value = "pageSize", defaultValue = "12") int pageSize,
			@RequestParam(value = "orderByString", defaultValue = "") String orderByString);
}
